//
//  ASplashWindow.m
//  K_Kitchen_Trial
//
//  Created by Sviluppo UK on 06/11/08.
//  Copyright 2008 Kandalu Software. All rights reserved.
//

#import "ASplashWindow.h"


@implementation ASplashWindow

+(void)initialize{
	NSRect screenRect = [[NSScreen mainScreen] frame];
	NSRect content = NSMakeRect(screenRect.size.width/2 - 260, screenRect.size.height/2 -100, 500, 300);
	
	NSWindow *w = [[NSWindow alloc] initWithContentRect:content styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
	[w setBackgroundColor:[NSColor colorWithPatternImage:[NSImage imageNamed:@"Splash_OP"]]];
	[w setOpaque:NO];
	[w setHasShadow:YES];
	[w makeKeyAndOrderFront:nil];
	usleep(3 * 1000000);
	[w close]; //NSWindows get released on close by default, releasing it again would cause an exception
}


@end